<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="text" />
<xsl:template match="/">/*******************************************************************************
** File Name:		     <xsl:value-of select="Schema/@TableName" />.cs
** Creator:		       <xsl:value-of select="Schema/@UserName" />
** EMail:            <xsl:value-of select="Schema/@UserEMail" /> 
** Create date:	     <xsl:value-of select="Schema/@ModifyDate" />
** Latest Modifier:
** Latest Modify date:
** Description:		    
** Modify History:
**
** Code Review:
**
** Version number:       1.0.0
*********************************************************************************/
using System.Runtime.Serialization;

using ESpace.DALibrary.SqlServer;
<!--取有多少列赋值给变量Count-->
<xsl:variable name="Count" >
	<xsl:value-of select="count(Schema/Columns)"/>
</xsl:variable>
namespace <xsl:value-of select="Schema/@DataEntityNameSpace" />
{
	[DataContract]
	public class <xsl:value-of select="Schema/@TableName" /> : DataEntityBase
	{
		public <xsl:value-of select="Schema/@TableName" />()
		{
			base.InitMetaData();
		}
		
		public <xsl:value-of select="Schema/@TableName" />(<xsl:for-each select="Schema/Columns"><xsl:value-of select="concat(LanguageType,' ',ColumnName)"/><xsl:if test="position() &lt;$Count">,</xsl:if></xsl:for-each>)
		{
			<xsl:for-each select="Schema/Columns">
				this._<xsl:value-of select="ColumnName" />=<xsl:value-of select="ColumnName" />;
			</xsl:for-each>
		}
		<xsl:for-each select="Schema/Columns">
		private <xsl:value-of select="concat(LanguageType,' _',ColumnName)" />;
		///	&lt;summary&gt;
		///	<xsl:value-of select="Description" />
		///	&lt;summary&gt;
		[DataMember]
		public <xsl:value-of select="concat(LanguageType,' ',ColumnName)" />
		{
			get
			{
				return this._<xsl:value-of select="ColumnName" />;
			}
			set
			{
				this._<xsl:value-of select="ColumnName" /> = value;
				IsChanged = true;
			}
		}
</xsl:for-each>	}
}</xsl:template>
</xsl:stylesheet>